package com.noreply.springannotation;

import com.noreply.springannotation.aop.AopConfiguration;
import com.noreply.springannotation.aop.MathCalculator;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author noreply
 * @description
 */
public class AOPTestAspect {
    @Test
    public void testAspect() {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AopConfiguration.class);
        MathCalculator mathCalculator = applicationContext.getBean(MathCalculator.class);
        mathCalculator.div(10, 0);
    }
}
